package com.cssl.mapper;

import com.cssl.domain.*;
import com.cssl.domain.dto.DtsorderDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface DtsorderMapper {

    List<Dtsorder> findPageorder(DtsorderDto dtsorderDto);

    boolean orderdelete(String ids);


    Integer addDirectOrder(Map userOrder);

    Dtsorder getOrderIdByOrderSn(String orderSn);


    Map getGoodsMoreInfo(@Param("goodsId") Integer goodsId,@Param("strings") List<String> strings);

    Integer addOrderGoods(Map map);

    Integer addCarOrder(Map map);

    Integer addOrderGoodsByList(@Param("cartList") List<DtsCart> cartList, @Param("orderId") Integer id);

    Map getAboutGoodsInfo(@Param("specifications") List<String> strings, @Param("roleId") Integer id);

    Integer addGroupOnOrder(Map insertMap);

    Integer isExitOrderGoods(@Param("goodsId") int goodsId, @Param("login") Integer login);

    Map getGoodsInfoByGroupId(@Param("userId") Integer login, @Param("groupId") Integer groupId);

    Integer participantOrder(Map<String, Object> insertMap);

    Map<String, Integer> conditionEnough(Integer groupId);

    Integer isGroupOrder(String s);

    void updateGroupOrderStatus(Integer res);

    Integer updateOrderSatus(String s);

    Dtsorder getAllPrice(Integer oId);

    DtsCouponUser getCouponId(String oId);

   List<Map<String, Object>> getGoodsPrice(@Param("userId") Integer userId);

    Map<String, Object> getDirectInfo(@Param("goodsId") Integer goodsId,@Param("specifications")List<String> strings);

    Map<String, Object> getGoodsGroupPrice(@Param("groupId")Integer groupId, @Param("specifications")List<String> strings);


    List<DtsCart> getCartCheckedGoods(Integer finalLogin);

    List<DtsCart> getNotCartGoods(@Param("goodsId") Integer id, @Param("productId") Integer productId);

    Map<String, Double> getDiscountMoneyById(Integer productId);

    Integer addCommonOrder(Map insertMap);

    DtsGroupOn getGroupUserId(@Param("userId") Integer loginId, @Param("groupId") Integer groupId);

    Integer
    addGroup(@Param("userId") Integer loginId,@Param("order") Dtsorder orderInfo, @Param("creator") Integer creatorUserId, @Param("rulesId") Integer rulesId,@Param("groupId")Integer groupId);

    Map<String, Double> getJoinDiscountMoneyById(Integer groupId);

    List<Map<String, Object>> getPayInfo(Integer oid);
    Integer updateorder(Map orderDto);
}
